#-------------------------------------------------------------------------------
# Name:        module1
# Purpose:
#
# Author:      Student
#
# Created:     04/07/2012
# Copyright:   (c) Student 2012
# Licence:     <your licence>
#-------------------------------------------------------------------------------
import random


class Card:
    def __init__(self, suit, value):
        self.suit= suit
        self.value= value
    def compare_suits (self, card):
        if (self.value=='Ace'):
            self.value==13
        if (self.value=='Queen'):
            self.value=12
        if (self.value=='Jack'):
            self.value==11
    def compare_Cards(self, card):
        x=self
        y=card
        x.compare_suits(y)
        if (self.suit>card.suit):
            print("your card has a higher suit")
        elif (self.suit<card.suit):
            print("your card has a lower suit")
        elif (self.value>card.value):
            print("your card has a higher value")
        elif (self.value<card.value):
            print("your card has a lower value")


def main():
    suits=["Clubs", "Diamonds", "Hearts", "Spades"]
    values=[]
    for i in range(2,11):
        values.append(str(i))
    faces=['Jack', 'Queen', 'King', 'Ace']
    values.extend(faces)
    deck=[]
    for x in suits:
        for y in values:
            card= Card (x, y)
            deck.append(card)
    random.shuffle(deck)
    c = random.choice(deck)
    d = random.choice(deck)
    print(c.value+" of "+c.suit)
    print(d.value+" of "+d.suit)
    c.compare_Cards(d)


if __name__ == '__main__':
    main()
